package com.example.designpattern.proxy.staticProxy;


public class MyProxy implements MySubject {
    private final MySubject realSubject;
    public MyProxy(MySubject realSubject){
        this.realSubject=realSubject;
    }
    @Override
    public void doSomething() {
        System.out.println("代理做事");
        realSubject.doSomething();
    }
    public String fun(){
        return "代理";
    }
}
